package com.athena.dal.entities;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the class database table.
 * 
 */
@Entity
@Table(name = "class")
public class Class implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(unique = true, nullable = false)
	private int id;

	@Temporal(TemporalType.DATE)
	@Column(nullable = false)
	private Date academicStartYear;

	@Column(length = 1)
	private String section;

	@Column(nullable = false)
	private int standard;

	@Column(nullable = false)
	private Timestamp updatedAt;

	// bi-directional many-to-one association to Faculty
	@ManyToOne
	@JoinColumn(name = "classTeacher", nullable = false)
	private Faculty classTeacher;

	// bi-directional many-to-one association to Routine
	@OneToMany(mappedBy = "clazz")
	private Set<RoutineRules> routineRules;

	// bi-directional many-to-one association to Routine
	@OneToMany(mappedBy = "clazz")
	private Set<RoutineInstance> routineInstance;

	// bi-directional many-to-one association to Result
	@OneToMany(mappedBy = "clazz")
	private Set<Result> results;

	// bi-directional many-to-one association to Student
	@OneToMany(mappedBy = "clazz")
	private Set<Student> students;

	public Class() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getAcademicStartYear() {
		return this.academicStartYear;
	}

	public void setAcademicStartYear(Date academicStartYear) {
		this.academicStartYear = academicStartYear;
	}

	public String getSection() {
		return this.section;
	}

	public void setSection(String section) {
		this.section = section;
	}

	public int getStandard() {
		return this.standard;
	}

	public void setStandard(int standard) {
		this.standard = standard;
	}

	public Timestamp getUpdatedAt() {
		return this.updatedAt;
	}

	public void setUpdatedAt(Timestamp updatedAt) {
		this.updatedAt = updatedAt;
	}

	public Faculty getClassTeacher() {
		return this.classTeacher;
	}

	public void setClassTeacher(Faculty classTeacher) {
		this.classTeacher = classTeacher;
	}

	public Set<RoutineRules> getRoutineRules() {
		return routineRules;
	}

	public void setRoutineRules(Set<RoutineRules> routineRules) {
		this.routineRules = routineRules;
	}

	public Set<RoutineInstance> getRoutineInstance() {
		return routineInstance;
	}

	public void setRoutineInstance(Set<RoutineInstance> routineInstance) {
		this.routineInstance = routineInstance;
	}

	public Set<Result> getResults() {
		return this.results;
	}

	public void setResults(Set<Result> results) {
		this.results = results;
	}

	public Set<Student> getStudents() {
		return this.students;
	}

	public void setStudents(Set<Student> students) {
		this.students = students;
	}

}